<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
</head>
<body>

</body>
<script>
	function Box(){
	
	}
	const obj = new Box();
	
	function myInstanceof(L,R){
		L = L.__proto__;
		R = R.prototype;
		while(true){
			if(L === null) return false;
			if(L === R) return true;
			L = L.__proto__;
		}
	}
	console.log(myInstanceof(obj,Box));// true
	console.log(myInstanceof(obj,Object));// true
</script>
</html>